<template>
  <view class="container">
    <public-module leftIcon="arrow-left" title="申论学习" />
    
    <view class="card-container">
      <!-- 名言名句卡片 -->
      <view class="function-card" @click="navigateTo('famousQuotes')">
        <text class="card-title">名言名句</text>
      </view>
      
      <!-- 名词解释卡片 -->
      <view class="function-card" @click="navigateTo('terms')">
        <text class="card-title">时政热词</text>
      </view>    
      
      <!-- 答案对比卡片 -->
      <view class="function-card" @click="navigateTo('answerCompare')">
        <text class="card-title">答案对比</text>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  methods: {
    navigateTo(type) {
      const routes = {
        famousQuotes: '/pages/papers/famousQuotes',
        terms: '/pages/papers/topic',
        answerCompare: '/pages/papers/provinceList'
      };
      uni.navigateTo({
        url: routes[type]
      });
    }
  }
};
</script>

<style lang="scss" scoped>
.container {
  padding: 20rpx;
  background-color: #f5f6f5;
  min-height: 100vh;
}

.card-container {
  display: flex;
  flex-direction: column;
  gap: 30rpx;
  margin-top: 40rpx;
}

.function-card {
  height: 200rpx;
  background-color: #fff;
  border-radius: 20rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  
  &:active {
    transform: scale(0.98);
    opacity: 0.9;
  }
}

.card-icon {
  width: 80rpx;
  height: 80rpx;
  margin-bottom: 20rpx;
}

.card-title {
  font-size: 32rpx;
  color: #333;
  font-weight: 500;
}
</style>